package com.link2room.optimus.facade;

import com.link2room.common.jpa.result.QueryResult;
import com.link2room.optimus.dto.param.base.MarketingStockBaseParamDto;
import com.link2room.optimus.dto.param.manager.MarketingManagerParamDto;
import com.link2room.optimus.dto.param.manager.RateplanHotelManagerParamDto;
import com.link2room.ironhide.dto.param.inside.HotelMinPriceInsideParamDto;
import com.link2room.jetfire.dto.param.base.ReservationParamDto;
import com.link2room.optimus.dto.param.base.MarketingBaseParamDto;
import com.link2room.optimus.dto.param.inside.BookStockInsideParamDto;
import com.link2room.optimus.dto.result.base.*;

import java.util.List;

/**
 * Created by sss on 2016/9/1.
 */
public interface IMarketingFacadeService {
    /**
     * 保存活动（集团）
     * @param marketingManagerParamDto
     * @throws Exception
     */
    MarketingDto saveMarketing(MarketingManagerParamDto marketingManagerParamDto)throws Exception;

    /**
     * 保存活动渠道相关
     * @param marketingManagerParamDto
     * @throws Exception
     */
    List<MarketingPbChannelDto> saveOrUpdateMarketingPbChannels(MarketingManagerParamDto marketingManagerParamDto) throws Exception;

    void saveOrUpdateRateplanHotel(RateplanHotelManagerParamDto rateplanHotelManagerParamDto)throws Exception;

    QueryResult<MarketingPbChannelDto> listMarketingPbChannels(MarketingManagerParamDto marketingManagerParamDto) throws Exception;

    /**
     * 组装活动酒店级别内容
     * @param marketingBaseParamDto
     * @throws Exception
     */
    void composeMarketing(MarketingBaseParamDto marketingBaseParamDto)throws Exception;

    /**
     * 保存活动详情
     * @param marketingBaseParamDto
     * @throws Exception
     */
    void saveMarketingDetail(MarketingBaseParamDto marketingBaseParamDto)throws Exception;

    /**
     * 更新活动详情
     * @param marketingBaseParamDto
     * @throws Exception
     */
    void updateMarketingDetail(MarketingBaseParamDto marketingBaseParamDto)throws Exception;

    void saveOrUpdateRmtypeEnterMarketingDetail(MarketingManagerParamDto marketingManagerParamDto)throws Exception;

    void saveOrUpdateHotelEnterMarketingDetail(MarketingManagerParamDto marketingManagerParamDto)throws Exception;

    /**
     * 获得酒店最低价
     * @param hotelMinPriceInsideParamDto
     * @return
     * @throws Exception
     */
    QueryResult<HotelMinPriceDto> getHoteMinPrice(HotelMinPriceInsideParamDto hotelMinPriceInsideParamDto) throws Exception;

    QueryResult<MarketingDetailDto> listMarketingDetails(MarketingManagerParamDto marketingManagerParamDto)throws Exception;

    /**
     * 获得产品明细
     * @param bookStockInsideParamDto
     * @return
     * @throws Exception
     */
    BookStockDto getMarketingDetail(BookStockInsideParamDto bookStockInsideParamDto)throws Exception;

    /**
     * 下单/取消订单变更房量
     * @param reservationParamDto
     * @throws Exception
     */
    void changeMarketingStock(ReservationParamDto reservationParamDto)throws Exception;

    void updateMarketing(MarketingManagerParamDto marketingManagerParamDto)throws Exception;

    /**
     * 活动列表
     * @param marketingManagerParamDto
     * @return
     * @throws Exception
     */
    QueryResult<MarketingDto> listMarketings(MarketingManagerParamDto marketingManagerParamDto)throws Exception;

    QueryResult<MarketingDto> listRmtypeEnterMarketings(MarketingManagerParamDto marketingManagerParamDto)throws Exception;

    /**
     * 单个活动
     * @param marketingManagerParamDto
     * @return
     * @throws Exception
     */
    MarketingDto findMarketing(MarketingManagerParamDto marketingManagerParamDto)throws Exception;

    MarketingAllDto findMarketingAll(MarketingManagerParamDto marketingManagerParamDto)throws Exception;

    void checkMcCode(MarketingManagerParamDto marketingManagerParamDto)throws Exception;

    QueryResult<MarketingDto> listHotelEnterMarketings(MarketingManagerParamDto marketingManagerParamDto)throws Exception;

    /**
     * 保存活动酒店
     * @param marketingManagerParamDto
     * @throws Exception
     */
    List<MarketingHotelDto> saveMarketingHotels(MarketingManagerParamDto marketingManagerParamDto) throws Exception;

    /**
     * 保存活动房型
     * @param marketingManagerParamDto
     * @throws Exception
     */
    List<MarketingRmtypeDto> saveMarketingRmtypes(MarketingManagerParamDto marketingManagerParamDto) throws Exception;

    void updateMarketingRmtypes(MarketingManagerParamDto marketingManagerParamDto) throws Exception;

    QueryResult<MarketingRmtypeDto> listMarketingRmtypes(MarketingManagerParamDto marketingManagerParamDto) throws Exception;

    /**
     * 活动酒店列表
     * @param marketingManagerParamDto
     * @return
     * @throws Exception
     */
    QueryResult<MarketingHotelDto> listMarketingHotels(MarketingManagerParamDto marketingManagerParamDto)throws Exception;

    /**
     * 变更选择酒店
     * @param marketingManagerParamDto
     * @throws Exception
     */
    List<MarketingHotelDto> updateMarketingHotels(MarketingManagerParamDto marketingManagerParamDto)throws Exception;

    void updateMarketingHotelsForTask(MarketingManagerParamDto marketingManagerParamDto)throws Exception;

    List<L2REverydayPriceAndStockDto> getMarketingDetailDataList(MarketingBaseParamDto marketingBaseParamDto)throws Exception;

    void saveOrUpdateMarketingStockToClosed(MarketingStockBaseParamDto marketingStockBaseParamDto)throws Exception;
}
